package com.canyou.system.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.canyou.base.BaseModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;
import java.time.ZonedDateTime;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author canyou
 * @since 2019-05-14
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("sys_user")
@ApiModel(value = "User对象", description = "用户")
public class User extends BaseModel {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("用户名")
    @TableField("username")
    private String username;

    @ApiModelProperty("密码")
    @TableField("password")
    private String password;

    @ApiModelProperty("部门id")
    @TableField("dept_id")
    private Long deptId;

    @ApiModelProperty("机构id")
    @TableField("org_id")
    private Long orgId;

    @ApiModelProperty("邮箱")
    @TableField("email")
    private String email;

    @ApiModelProperty("联系电话")
    @TableField("mobile")
    private String mobile;

    @ApiModelProperty("生日")
    @TableField("birthday")
    private ZonedDateTime birthday;

    @ApiModelProperty("状态 0锁定 1有效")
    @TableField("status")
    private Integer status;

    @ApiModelProperty("最近访问时间")
    @TableField("last_login_time")
    private LocalDateTime lastLoginTime;

    @ApiModelProperty("性别 0未知1男 2女")
    @TableField("sex")
    private Integer sex;

    @ApiModelProperty("主题")
    @TableField("theme")
    private String theme;

    @ApiModelProperty("头像")
    @TableField("avatar")
    private String avatar;

    @ApiModelProperty("描述")
    @TableField("description")
    private String description;

    @ApiModelProperty("小程序openid")
    @TableField("openid")
    private String openid;

    @ApiModelProperty("真实姓名")
    @TableField("real_name")
    private String realName;

}
